<template>
  <el-container style="height: 100vh;">
    <!-- 头部 -->
    <el-header>
      <h3>Vue-Demo</h3>
    </el-header>

    <!-- 主体部分 -->
    <el-container>
      <!-- 左侧导航栏 -->
      <el-aside width="200px">
        <el-menu :default-openeds="['1']" :router="true" default-active="this.$route.path">
          <el-submenu index="1">
            <template #title><i class="el-icon-message"/>表格表单</template>
            <el-menu-item index="/">
              <i class="el-icon-s-home"></i>
              <span slot="title">表格表单</span>
            </el-menu-item>
            <el-menu-item index="/FormTablePage">
              <i class="el-icon-info"></i>
              <span slot="title">分页表格表单</span>
            </el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template #title><i class="el-icon-message"/>表格Demo2</template>
            <el-menu-item index="/">
              <i class="el-icon-s-home"></i>
              <span slot="title">表格表单</span>
            </el-menu-item>
            <el-menu-item index="/PromiseTest">
              <i class="el-icon-info"></i>
              <span slot="title">分页表格表单</span>
            </el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>

      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name: 'App',
};
</script>

<style>
/* 添加一些样式 */
.el-header {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  padding: 20px;
}
</style>